﻿<!--
	@create by 
	@update by 
	@description 
-->
<div >
	<div class= "yu-toolBar" >
		<el-button-group >
		<el-button icon= "plus" @click= "addFn" v-if= "!formDisabled" >
			新增
		</el-button>
		<el-button icon= "yx-bin" @click= "deleteFn" v-if= "!formDisabled" >
			删除
		</el-button>
		</el-button-group>
	</div>

	<el-table ref= "ruleRelTable" :data= "mainGrid.data" v-loading= "mainGrid.loading" stripe border fit highlight-current-row element-loading-text = "加载中..." @row-click= "rowClickFn" >
		<!--  <el-table-column label="产品ID">
          <template scope="scope">
              <span>{{ scope.row.prdId }}</span>
          </template>
      </el-table-column> -->
		<el-table-column prop= "ruleCollId" label= "规则集ID" >
			<template scope= "scope" >
			<span >{{ scope.row.ruleCollId }}</span>
			</template>
		</el-table-column>
		<el-table-column prop= "ruleCollDesc" label= "规则集合描述" >
			<template scope= "scope" >
			<span >{{ scope.row.ruleCollDesc }}</span>
			</template>
		</el-table-column>
		<el-table-column prop= "ruleCollType" label= "规则类型" >
			<template scope= "scope" >
			<span >{{ ruleType[scope.row.ruleCollType] }}</span>
			</template>
		</el-table-column>
		<el-table-column prop= "action" label= "操作" >
			<template scope= "scope" >
				<el-button icon= "document" @click= "lookRuleDtl(scope)" size="small">
					查看
				</el-button>
			</template>
		</el-table-column>
	</el-table>

	<el-dialog title= "规则列表" :visible.sync= "dialogVisible" size= "large" >
		<el-form-q :field-data= "queryFields" :buttons= "queryButtons" ></el-form-q>
		<div class= "yu-toolBar" >
			<el-button-group >
				<el-button icon= "document" @click= "ruleDtlInfoFn" >
					查看
				</el-button>
			</el-button-group>
		</div>
		<el-table-x ref= "ruletable" :data-url= "dataUrl" :radiobox= "true" :base-params="ruleParams"
		      @row-click= "rowClickFn" :table-columns= "tableColumns" v-loading= "myLoading" 
		      @loaded= "tableLoaded" request-type= "POST" >
		</el-table-x>
		<div slot= "footer" class= "dialog-footer" >
			<el-button @click= "dialogVisible = false" >
				取 消
			</el-button>
			<el-button type= "primary" @click= "confirmFn" >
				确 定
			</el-button>
		</div>
	</el-dialog>

	<el-dialog title="规则详情" :visible.sync= "ruleDtlDiaVis" size= "full" >
		<div id="prdLookRuleDtl"></div>
		<div class= "yu-toolBar" style="text-align: center;">
			<el-button-group>
				<el-button icon= "yx-undo2" @click= "ruleDtlRtn" >
					返回
				</el-button>
			</el-button-group>
		</div>
	</el-dialog>
</div>
